Algorithms

Algorithms and Flowcharts

Algorithms

An algorithm is a set of steps designed to solve a specific problem. An example is an algorithm that sorts a list of items into alphabetical order. The flowchart is a tool that is used by many people to plan algorithms.


Flowcharts

A range of different symbols is used in flowcharts; each has a different meaning. The table below summarises the most common symbols:


Name Symbol Description
Start/Stop

The start or end of the program. There may be more than one way to complete the algorithm and there may be more than one end box.

Process

A process that is doing something, for example calculating something.

Input/Output

An input or output, for example: Input num1

Decision

A decision, YES or NO, or a choice of paths, for example: Is it a weekday?

 

The algorithm in the example flowchart shown below asks the user to input two numbers, adds them together and outputs the result.